<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/static/commons/taglibs.jsp"%>
<%@ include file="/static/commons/meta.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="${ctx}/static/styles/login/Global.css" />
    <link rel="stylesheet" href="${ctx}/static/styles/template/cover.css" />
</head>
<body>
<section class="cover">
    <!--页眉-->
    <header>
        <img src="${ctx}/static/images/template/logo.png" />
        <article>
            <h1>四川西油正诚检测有限公司</h1>
            <p>SICHUAN SOUTHWEST PETROLEUM FAIR HONEST VERIFICATION CO.,LTD</p>
        </article>
    </header>

    <!--内容部分-->
    <section>
        <article>
            <h1>检  定  证  书</h1>
            <p>VERIFICATION CERTIFICATE</p>
        </article>

        <nav class="top">
            <label>证书编号
                <i>Certificate No.</i>
            </label>
            <em>气检仪</em>字&nbsp;第
            <span>JD</span>号
        </nav>

        <ul>
            <li>
                <label>送 检 单 位
                    <i>Applicant</i>
                </label>
                <span>${info.cust_name}</span>
            </li>
            <li>
                <label>计量器具名称
                    <i>Inctrumentati</i>
                </label>
                <span>${info.device_name}</span>
            </li>
            <li>
                <label>型 号/规 格
                    <i>SpecificationЩ</i>
                </label>
                <span>${info.device_model}</span>
            </li>
            <li>
                <label>出 厂 编 号
                    <i>Manufacture No</i>
                </label>
                <span>${info.device_no}</span>
            </li>
            <li>
                <label>制 造 单 位
                    <i>Manufactured By</i>
                </label>
                <span>${info.device_manufactor}</span>
            </li>
            <li>
                <label>检 定 依 据
                    <i>Inspection standand</i>
                </label>
                <span>${verifies}</span>
            </li>
            <li>
                <label>检 定 结 论
                    <i>Conclusi</i>
                </label>
                <span>${result}</span>
            </li>
        </ul>

        <div>
            <aside>
                <label>发证单位（专用章）
                    <i>Lssued By &nbsp;&nbsp;&nbsp;(Seal) </i>
                </label>
                <div><img src="${ctx}/static/UserFiles/sign/16101022480448416670.png" style="width:100px;height: 100px;"></div>
            </aside>

            <ol>
                <li>
                    <label>批 准 人
                        <i>Approved By</i>
                    </label>
                    <span><img src="${ctx}/static/UserFiles/sign/liu.png" style="width:50px;height: 50px;"></span>
                </li>
                <li>
                    <label>核 验 员
                        <i>Inspected By</i>
                    </label>
                    <span><img src="${ctx}${checkUserQM}" style="width:50px;height: 50px;"></span>
                </li>
                <li>
                    <label>检 定 员
                        <i>Verified By</i>
                    </label>
                    <span><img src="${ctx}${verifiedUserQM}" style="width:50px;height: 50px;"></span>
                </li>
            </ol>
        </div>

        <nav class="foot" style="margin-bottom: auto;">
            <label>检 定 日 期
                <i>Verification Date</i>
            </label>
            <span>${verifYear}</span>

            <label>年
                <i>Year</i>
            </label>
            <span>${verifMonth}</span>

            <label>月
                <i> Month </i>
            </label>
            <span>${verifDay}</span>
            <label>日
                <i>Day</i>
            </label>
        </nav>
        <nav class="foot" style="margin-top: auto;position: relative" id="validityDateDivId">
            <label style="width: 102px">有 效 期 至
                <i>Valid  date to</i>
            </label>
            <span>${validityYear}</span>

            <label>年
                <i>Year</i>
            </label>
            <span>${validityMonth}</span>

            <label>月
                <i> Month </i>
            </label>
            <span>${validityDay}</span>
            <label>日
                <i>Day</i>
            </label>
            <div id="validityDateId" style="display: none; text-align: center;position: absolute;top: -100px;left: 200px; background-color: #fff; width: 350px;height:25px;border-radius: 2px;box-shadow: 1px 1px 50px rgba(0,0,0,.3);border: solid 1px #666;padding: 10px" >
                <span style="font-size: 20px;font-weight: bold;border-bottom:0;width:120px;">选择日期：</span><input id="sendDate" type="text" class="Wdate" style="width: 200px;font-size: 20px;border-bottom:solid 1px #666;" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',onpicking:function(dp){saveDate(dp.cal.getNewDateStr())}})"   />
            </div>
        </nav>
    </section>

    <!--页尾-->
    <footer>
        <table>
            <tr>
                <td>计量检定机构授权证书号： （川）法计（2011） 4009号</td>
                <td>传真：028-84302500</td>
            </tr>
            <tr>
                <td>地址：成都市成华区建祥路6号409</td>
                <td>邮编：610051</td>
            </tr>
            <tr>
                <td>电话：028-84364567</td>
                <td>EMAIL：xyzc84364567@163.com</td>
            </tr>
        </table>
    </footer>

</section>

</body>
<script type="text/javascript" src="${ctx}/static/scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="${ctx}/static/scripts/layer/layer.js"></script>
<script type="text/javascript" src="${ctx}/static/scripts/WdatePicker/WdatePicker.js"></script>

<script type="text/javascript">
    var headers = {};
    headers['__RequestVerificationToken'] = "${RequestVerificationToken}";
    $("#validityDateDivId").click(function (e) {
        if (e && e.stopPropagation){
        //因此它支持W3C的stopPropagation()方法
            e.stopPropagation();
        }else{
        //否则，我们需要使用IE的方式来取消事件冒泡
            window.event.cancelBubble = true;
        }
        if($("#validityDateId").css("display")=="none"){

            $("#validityDateId").css("display","block");
        }else{
            $("#validityDateId").css("display","none");
        }
    });
    $("body").click(function () {
        $("#validityDateId").css("display","none");
    })
    $("#validityDateId").click(function(e){
        if (e && e.stopPropagation){
            //因此它支持W3C的stopPropagation()方法
            e.stopPropagation();
        }else{
            //否则，我们需要使用IE的方式来取消事件冒泡
            window.event.cancelBubble = true;
        }
    })
    function saveDate(date) {
        $.ajax({
            cache: false,
            type: "POST",
            headers: headers,
            url:'${ctx}/makeController/updateValidityDate',
            data:{"certId":${certId},"validityDate":date},
            async: false,
            error: function(request) {
                location.reload();
            },
            success: function(data) {
                location.reload();
            }
        });

    }
</script>
</html>
